<?php

/* Copyright 2010 John Hooley

	  
    This file is part of Portfolio Zen.


    Portfolio Zen is free software: you can redistribute it and/or modify

    it under the terms of the GNU General Public License as published by

    the Free Software Foundation, either version 3 of the License, or

    (at your option) any later version.



    Portfolio Zen is distributed in the hope that it will be useful,

    but WITHOUT ANY WARRANTY; without even the implied warranty of

    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the

    GNU General Public License for more details.



    You should have received a copy of the GNU General Public License

    along with Portfolio Zen.  If not, see <http://www.gnu.org/licenses/>.

 */

defined('_JEXEC') or die('Restricted access');

abstract class IEConditional {

  static public function comment($version, $type, $uri){
    $comment = "<!--[if IE {$version}]>\r\n";
    $comment .= ($type === 'stylesheet') ? self::getStylesheetDeclaration($uri) : self::getScriptDeclaration($uri);
    return $comment . "\r\n<![endif]-->\r\n";
  }

  static public function getStylesheetDeclaration($uri){
    return '<link href="'.$uri.'" rel="stylesheet" type="text/css" />';
  }

  static public function getScriptDeclaration($uri){
    return '<script type="text/javascript" src="'.$uri.'"></script>';
  }


}